package demo8;

import com.sun.javaws.IconUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

//@Component
//@Controller
//@Service
@Repository
public class Person {
    //@Autowired
    @Resource//(name = "shirt")
    //private Clothes sweater;
    private Clothes shirt;
    public void play(){
        //clothes.wear();
        //sweater.wear();
        shirt.wear();

        System.out.println("出去玩");
    }
}
